// Tradex.Connectivity.Rithmic.h

#pragma once

#include "vcclr.h"
#include "NxCoreAPI.h"

#include "DomQuote.h"

using namespace System;
using namespace System::Collections::Generic;
using namespace System::Data::Common;
using namespace System::IO;
using namespace System::Reflection;

using namespace Tradex::Market;

namespace Tradex {
	namespace Connectivity {
		namespace NxCore {

			public ref class InstrumentCache {

			public:
				InstrumentCache(void);

				[System::Security::SecurityCritical()]
				void SetInstrumentBasics (String^ pMarket, const NxCoreSystem* pNxCoreSys, const NxCoreMessage* pNxCoreMsg);

				bool RegisterBid (DomQuote^ bid);

				array<DomQuote^>^ ProcessDeletedBids ();

				bool RegisterAsk (DomQuote^ bid);

				array<DomQuote^>^ ProcessDeletedAsks ();

				property InstrumentKey^ MyInstrumentKey {
					[System::Security::SecurityCritical()]
					InstrumentKey^ get()  {
						return _InstrumentKey;
					}
				}

				property InstrumentType MyInstrumentType {
					[System::Security::SecurityCritical()]
					InstrumentType get () {
						return _InstrumentType;
					}
				}

			private:
				InstrumentKey^ _InstrumentKey;
				InstrumentType _InstrumentType;

				array<DomQuote^>^ _BidArray;
				array<DomQuote^>^ _AskArray;

			};

		}
	}
}